def call(String cmd) {
  env.SCM = cmd
  pipeline {
    agent any

    options {
        // This is required if you want to clean before build
        skipDefaultCheckout(true)
    }

    stages {
      stage('Build') {
        steps {
            // Clean before build
            cleanWs()

            echo ${GIT_BRANCH}

            git checkout ${GIT_BRANCH}
            git pull
            yarn
        }
      }
    }
  }
}